/**
 * Created by kule on 2017/5/18.
 */
//使用remove函数来移除数组元素，而不是lodash中默认的splice方式
export const removeArrayItem = function (array, filter, remove) {
    for (let i = 0; i < array.length; i++) {
        if (filter(array[i], i)) {
            remove(array[i], i);
            i--;
        }
    }
};
export const removeArrayItemAll = function (array, remove) {
    return removeArrayItem(array, () => true, remove);
};
export default removeArrayItem;